package test;

//找只出现一次的非空字符串

import java.util.Scanner;

public class topic13 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        char[] chars = s.toCharArray();
        String k = "-1";
        for (int i = 0; i < s.length(); i++) {
            if (s.indexOf(chars[i])== s.lastIndexOf(chars[i])){
                k = chars[i] + "";
                break;
            }
        }
        System.out.println(k);
    }
}
